<extend name="./Base/base" />

<block name="main">
	<div class="row">
		<div class="panel">
			<div class="panel-heading bk-bg-primary">
				<h6><i class="fa fa-table red"></i><span class="break"></span>分类列表&nbsp&nbsp<button  onclick="add();return false;" class="btn btn-large btn-primary">添加权限&nbsp</button></h6>							
			</div>
			<!-- 添加菜单模态框开始 -->
				<div class="modal fade" id="bjy-add" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
					<div class="modal-dialog">
						 <div class="modal-content">
							<div class="modal-header">
								<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
									&times;
								</button>
								<h4 class="modal-title" id="myModalLabel" >
									添加权限
									<!-- <button  onclick="add();return false;" class="btn btn-large btn-primary">添加权限&nbsp</button> -->
								</h4>
							</div>
							<div class="modal-body">
								<form id="bjy-form" class="form-inline" action="" method="post">
									<input type="hidden" name="pid" value="0">
									<table class="table table-striped table-bordered table-hover table-condensed">
										<tr>
											<th width="12%">权限名：</th>
											<td>
												<input class="input-medium" type="text" name="title">
											</td>
										</tr>
										<tr>
											<th>权限：</th>
											<td>
												<input class="input-medium" type="text" name="name"> 输入模块/控制器/方法即可 例如 Admin/Rule/index
											</td>
										</tr>
										<tr>
											<th></th>
											<td>
												<input class="btn btn-large btn-primary" type="submit" value="添加" style="background:#34495E">
											</td>
										</tr>
									</table>
								</form>
							</div>
						</div>
					</div>
				</div>
			<!-- 添加菜单模态框结束 -->
			<div class="panel-body">
				<div class="table-responsive">
					<table class="table">
						  <thead>
							<tr>
							  <th>权限名</th>
							  <th>权限</th>
							  <th>操作</th>
							</tr>
						  </thead> 
						    
						<tbody>
							<!-- <foreach name="list" item="vo">
							  <tr>
									<td>{$vo.id}</td>
									<td>{$vo.username}</td>
									<td>{$vo.email}</td>
									<td>{$vo.update_at|date='Y-m-d H:i:s',###}</td>
									<if condition=" $vo.status eq 1 ">
										<td>
											<a href="javascript:userstatus({$vo.id});"><span class="btn btn-warning">正常</span></a>
										</td>
									<else /> 
										<td>
											<a href="javascript:userstatus({$vo.id});"><span class="btn btn-danger">禁用</span></a>
										</td>
									</if>
									
									<td>
										
										<a class="btn btn-info" href="{:U('User/user_edit','id='.$vo['id'])}"  >
											<i class="fa fa-edit "></i>                                            
										</a>
										<a class="btn btn-danger" href="javascript:delete_order({$vo.id});" >
											<i class="fa fa-trash-o "></i> 

										</a>
									</td>
								</tr>
							</foreach>	 -->								                                  
						</tbody>
					</table>
				</div>
				 <div class="green-black">{$page}</div>
			</div>
		</div>
	</div>
</block>
<block name="script_user">
	<script type="text/javascript">
		function add(){
			$("input[name='title'],input[name='name']").val('');
			$("input[name='pid']").val(0);
			$('#bjy-add').modal('show');
		}

	</script>
</block>